<!DOCTYPE html>
<html>

<head>
      {% load static %}
      <title>Расписание</title>
      <link rel="stylesheet" href="{% static 'accounts/ceonotif.css' %}">
      <link rel="icon" href="{% static 'images/favicon.ico' %}">
      <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>

<body>
      <nav class="navbar navbar-expand-lg bg-body-tertiary">
        <div class="container-fluid">
          <a class="navbar-brand" href="#">
		  <img src="{% static 'accounts/images/logo_center.png' %}" width="120px" height="120px">
          </a>
          <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav">
              <li class="nav-item">
		      <a class="nav-link active" aria-current="page" href="{% url 'accounts:mr-cab-month' user_id=uid %}">Управление графиком</a>
              </li>
              <li class="nav-item">
		      <a class="nav-link" href="{% url 'accounts:mr-cab-hr' user_id=uid %}">Управление кадрами</a>
              </li>
	      {% if notifications %}
	      <li class="nav-item">
			<a class="nav-link" href="{% url 'accounts:mr-cab-not' user_id=uid %}" style="color: red; font-weight: bold;">Уведомления</a>
	      </li>
	      {% else %}
              <li class="nav-item">
		      <a class="nav-link" href="{% url 'accounts:mr-cab-not' user_id=uid %}">Уведомления</a>
              </li>
	      {% endif %}
              <li class="nav-item">
		      <a class="nav-link"  href="{% url 'accounts:mr-cab-pred' user_id=uid %}">Прогнозирование количества исследований</a>
              </li>
          </div>
            <div class="ms-auto" style="text-align: center;">
              <p style="margin-right: 10px;">Вы авторизированы как Руководитель</p>
	      <a href="{% url 'accounts:logout' %}">Выйти</a>
            </div>
        </div>
      </nav>
      <div class="notifications">
    <div class="list-group" style="width: 95%;">
	      {% if not notifications %}
	      <body>
    <div class="centered-text">
        Уведомлений нет
    </div>
</body>
    {% endif %}
    {% for notification in notifications %}
        <div class="list-group-item list-group-item-action">
            <div class="d-flex w-100 justify-content-between">
                <h5 class="mb-1">{{ notification.name_emp }}</h5> <!-- Выводим значение атрибута name_emp -->
		{% if notification.type_not %}
		    <a href="{% url 'accounts:remove_notification' notification.id %}">
                    	<img src="{% static 'accounts/images/delete.png' %}" style="display: inline-block;">
            	    </a>			
            	{% else %}
		<div>
            <a href="{% url 'accounts:add_dr_not' notification.id %}">
                <img src="{% static 'accounts/images/accept.png' %}" style="display: inline-block;">
            </a>
            <a href="{% url 'accounts:del_dr_not' notification.id %}">
                <img src="{% static 'accounts/images/delete.png' %}" style="display: inline-block;">
            </a>
        </div>
		{% endif %}
	    </div>
            <p class="mb-1">{{ notification.text_not }}</p> <!-- Выводим значение атрибута text_not -->
        </div>
    {% endfor %}
    </div>
</div>
</body>

</html>
